package registry

//注册对象
type Registration struct {
	ServiceName      ServiceName   //服务名称
	ServiceURL       string        //服务url
	RequiredServices []ServiceName //此服务所依赖的服务
	ServiceUpdateURL string        //专门接收注册中心对服务更新通知的url
	HeartbeatURL     string        //专门接收心跳检查
}
type ServiceName string

const (
	LogService       = ServiceName("LogService")
	GradingService   = ServiceName("GradingService")
	PortalService    = ServiceName("Portal")
	ServiceUpdateURL = "/serviceUpdate"
	HeartbeatURL     = "/serviceHeartbeat"
)

//更新结构体
type patchEntry struct {
	Name ServiceName
	URL  string
}

//更新列表结构体
type patch struct {
	Added   []patchEntry
	Removed []patchEntry
}
